package com.projectName.www.util;

import com.projectName.www.dao.BaseDao;

import java.sql.ResultSet;

public class find {
    //查找店铺
    public static String name(String name) throws Exception {
        String finalname;

        String sql = "select *from shop where shopkeeper = ?";
        ResultSet resultSet = BaseDao.executeQuery(sql, name);

        resultSet.next();

        finalname=resultSet.getString("name");

        return finalname;
    }
        //查询菜名
    public static ResultSet dishes(String name) throws Exception {
        String sql = "select * from dishes where name =? ";
        ResultSet resultSet = BaseDao.executeQuery(sql, name);
        return resultSet;
    }
    public static ResultSet shop_dishes(String name) throws Exception {
        String sql = "select * from dishes where shopname =? ";
        ResultSet resultSet = BaseDao.executeQuery(sql, name);
        return resultSet;
    }

    }

